<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title><s:property value="person" />的个人空间</title>
</head>
<body>
	<div class="row">
	
		<!-- 左 *******************************************************-->
		
		<div id="personInfo" class="span3" >
			
			<div class="clearfix">
				<div class="pull-left" style="width: 60px;">
					<img id="headPortrait" alt="">
				</div>
				<div class="pull-left lead" style="font-size: 150%">
					<span id="showName"></span>
					<s:if test="!guest">
						<a onclick="to_admin()" href="javascript:void(0);"><i
							class="icon-edit"></i>
						</a>
					</s:if>
				</div>
			</div>
		 
			<div id="signature" class="alert alert-success"></div>

			<div id="personInfoWidget" class="alert alert-info">
				<p id="realName">
					真实姓名：<span></span>
				</p>
				<p id="workUnit">
					工作单位：<span></span>
				</p>
				<p id="location">
					所在地：<span></span>
				</p>
				<p id="telephone">
					手机：<span></span>
				</p>
				<p id="email">
					邮箱：<span></span>
				</p>
				<p id="qq">
					QQ：<span></span>
				</p>
				<p id="job">
					职业技能：<span></span>
				</p>
			</div>
		</div>

		<!-- 右 *******************************************************-->
		<div class="span8">
		
			<ul  id="counts" class="nav nav-tabs" id="tab">
				<li class="active">
				<a id="t_btn" data-toggle="tab" href="#teachesView">所教(<span id="teachingsCount" ></span>)</a></li>
				<li><a id="s_btn" data-toggle="tab" href="#studiesView">所学(<span id="studiesCount" ></span>)</a>
				</li>
			</ul>
			
			<div class="tab-content">
				<div id="teachesView" class="tab-pane fade in active" >
				<center id="unTeach"><h2>还没有开课哦。</h2><a href="course/set-up-course.action" class="btn">马上去开课</a></center>
				<div id="teaches"  >
					<div class="page-header">
						<h2>
							<a id="teachCourseName" href="javascript:void(0);"></a> &nbsp;&nbsp;
							<small>
								<span id="teachRepeatSummaryV">
								上课
								<i class="icon-time"></i>&nbsp;&nbsp;
								<span id="teachRepeatSummary" ></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								</span>
								<span id="teachCouseTagV" >
									<i class="icon-tags"></i>
									<span id="teachCouseTag" ></span>
								</span>
							 </small>
						</h2>
						<div id="teachCourseDescription"></div>
					</div>
				</div>
				</div>
				<div id="studiesView" class="tab-pane fade">
					<div id="unStudy" >
						<center><h2>还没有选修课程哦。</h2><a href="course/want-study.action" class="btn">马上去选喜欢的课程</a></center>
					</div>
					<div id="studies" >
					<div class="page-header">
						<h2>
							<a id="studyCourseName" href="javascript:void(0);"></a> 
							<small> 
							<span id="studyCourseTagV"><i class="icon-tags"></i>&nbsp;&nbsp;
							<span id="studyCourseTag"></span>
							</span> </small>
						</h2>
						<div id="studyCourseDescription"></div>
					</div>
					</div>
				</div><!-- study-list -->
			</div>
		</div> 

	</div>	<!-- row -->


	<script>
	var queue = $LAB.script('<%=basePath%>ui/bootstrap/js/bootstrap-tab.js').wait()
	.script('<%=basePath%>scripts/vendor/knockout-2.0.0.js').wait()
	.script('<%=basePath%>scripts/viewmodel/model.repeat.js')
	.script('<%=basePath%>scripts/viewmodel/model.course.js')
	.script('<%=basePath%>scripts/viewmodel/model.person.js')
	.script('<%=basePath%>scripts/viewmodel/model.studying.js')
	.script('<%=basePath%>scripts/viewmodel/model.teaching.js')
	.script('<%=basePath%>scripts/viewmediator/mediator.common.js').wait()
	.script('<%=basePath%>scripts/viewmediator/mediator.person-info-widget.js')
	.script('<%=basePath%>scripts/viewmediator/mediator.teaching-list.js')
	.script('<%=basePath%>scripts/viewmediator/mediator.studying-list.js')
	.script('<%=basePath%>scripts/viewmediator/mediator.teachings-studies-count.js')
	.script('<%=basePath%>scripts/viewmediator/mediator.person-space.js')
	.script('<%=basePath%>scripts/application.js').wait(function() {
		init();
	});

	function init() {
		$.ajaxSettings.async = false;
		$('.tabs').tab();
		var pid = $.URLParams('pid');
		initPersonSpace(pid);
	}
	</script>
</body>
</html>